package omni.cloud.config.client;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.stereotype.Component;

@SpringBootApplication // 相当于@Configuration、@EnableAutoConfiguration、@ComponentScan
@EnableOAuth2Sso
public class OauthClientApplication {

	public static void main(String[] args) {
		SpringApplication.run(OauthClientApplication.class, args);
	}
	/*
	@Component
	public static class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

	    @Override
	    public void init(WebSecurity web) {
	        // web..ignore("/");
	    }

	    @Override
	    protected void configure(HttpSecurity http) throws Exception {
	        http.antMatcher("/**").authorizeRequests().anyRequest().authenticated();
	    }

	}
	*/
}
